package com.consum.controller;

import com.api.service.Demo2Service;
import com.api.service.DemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class ConsumerTestController {

    public static void main(String args[]){

        //获取spring context
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:springmvc.xml");
        context.start();  //启动容器

        DemoService demoService = (DemoService) context.getBean("demoService");
        System.out.println(demoService.sayHello("Dubbo!"));

        Demo2Service demo2Service = (Demo2Service)context.getBean("demo2Service");
        System.out.println(demo2Service.countSelect());
        context.close();

    }
}